package com.ruoyi.cms.blog.domain;

import java.math.BigDecimal;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 用户消费记录对象 cms_user_amount_log
 *
 * @author ruoyi
 * @date 2025-04-13
 */
@Setter
@Getter
@Accessors(chain = true)
public class CmsUserAmountLog extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    private Long id;

    /**
     * 用户id
     */
    @Excel(name = "用户id")
    private Long userId;

    /**
     * 广告id
     */
    @Excel(name = "广告id")
    private Long adId;

    /**
     * 广告标题
     */
    private String title;

    /**
     * 充值金额
     */
    @Excel(name = "充值金额")
    private BigDecimal rechargeAmount;


    /**
     * 消费金额
     */
    @Excel(name = "消费金额")
    private BigDecimal consumeAmount;

    /**
     * 消费时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "操作时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date actionTime;
    /**
     * 消费类型
     */
    private String type;

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("userId", getUserId())
                .append("adId", getAdId())
                .append("rechargeAmount", getRechargeAmount())
                .append("consumeAmount", getConsumeAmount())
                .append("consumeTime", getActionTime())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("remark", getRemark())
                .toString();
    }
}
